<?php

namespace app\common\model;

use think\Model;

/**
 * DeviceDevice
 */
class DeviceDevice extends Model
{
    // 表名
    protected $name = 'device_device';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function place(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\common\model\DevicePlace::class, 'place_id', 'id');
    }

    public function engine(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\common\model\DeviceEngine::class, 'engine_id', 'id');
    }
}